package com.huashizhaoxi.lionapp.service.Impl;

import com.huashizhaoxi.lionapp.dao.ProductMapper;
import com.huashizhaoxi.lionapp.entity.Product;
import com.huashizhaoxi.lionapp.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductServiceImpl implements ProductService {

    @Autowired
    ProductMapper productMapper;

    @Override
    public List<Product> getAllProduct() {
        return productMapper.getAllProduct();
    }

    @Override
    public List<Product> searchProduct(String keyword) {
        return productMapper.searchProduct(keyword);
    }

    @Override
    public int deleteProduct(Integer id) {
        return productMapper.deleteProduct(id);
    }
}
